package com.teprinciple.wanandroid.ui.page

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.teprinciple.wanandroid.data.Article
import com.teprinciple.wanandroid.ui.theme.blue1

@Composable
fun QAPage() {
    Column {
        Row(
            modifier = Modifier.fillMaxWidth().height(40.dp).background(blue1),
            verticalAlignment = Alignment.CenterVertically,
            horizontalArrangement = Arrangement.Center
        ) {
            Text(
                text = "问答",
                fontSize = 16.sp,
                color = Color.White,
                textAlign = TextAlign.Center,
            )
        }

        LazyColumn(content = {
            items(Article.testQaData) {
                HomeArticleItem(article = it)
            }
        })
    }
}